<template>
  <div>
    <div class="content" v-show="index == 0">
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp03%2F1Z9211616415M2-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642923028&t=ce6d1026885d4377966ed290370e1af9"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>百搭男裤</p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
    </div>
    <div class="content" v-show="index == 1">
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp03%2F1Z9211616415M2-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642923028&t=ce6d1026885d4377966ed290370e1af9"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>百搭男裤</p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
      <div class="content_box">
        <div class="content_box_img">
          <img
            src="https://img2.baidu.com/it/u=1357720467,2636512316&fm=26&fmt=auto"
            alt=""
          />
        </div>
        <div class="content_box_text">
          <p>
            百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤百搭男裤
          </p>
        </div>
        <div class="content_box_user">
          <div class="user_box">
            <div class="user_img">
              <img
                src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F21042G4331941H-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642925399&t=7afeac3a084ef38252737f34e1bf455a"
                alt=""
              />
            </div>
            <div class="user_name">
              <p>用户名</p>
            </div>
          </div>
          <div class="user_fiery">
            <span class="iconfont icon-zhangyu">123</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import bus from "../../api/bus.js";
export default {
  data: function () {
    return {
      index: 0,
    };
  },
  mounted() {
    bus.$on("gojump", (index) => {
      this.index = index;
    });
  },
  //销毁组件后销毁监听
  destroyed() {
    bus.$off("gojump");
  },
};
</script>

<style lang="less">
.content {
  height: 100%;
  padding: 0 5px;
  column-count: 2;
  box-sizing: border-box;
  margin-top: 5px;
  column-gap: 3px;
  .content_box {
    width: 100%;
    height: 100%;
    background-color: #fff;
    padding: 5px;
    margin-bottom: 5px;
    -webkit-column-break-inside: avoid;
    break-inside: avoid;
    counter-increment: item-counter;
    box-sizing: border-box;
    .content_box_img {
      width: 98%;
      height: 192px;
      overflow: hidden;
      margin: 0 auto;
      display: flex;
      justify-content: center;
      align-items: center;
      img {
        height: 100%;
      }
    }
    .content_box_text {
      padding: 10px 0px 6px 8px;
      font-size: 12px;
      p {
        width: 100%;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        min-height: 16px;
      }
    }
    .content_box_user {
      padding: 0px 7px;
      width: 100%;
      display: flex;
      box-sizing: border-box;
      justify-content: space-between;
      align-items: center;
      .user_box {
        display: flex;
        font-size: 12px;
        .user_img {
          width: 16px;
          height: 16px;
          padding-right: 3px;
          img {
            width: 16px;
            height: 16px;
            border-radius: 50%;
          }
        }
        .user_name {
          color: #949399;
        }
      }
      .user_fiery {
        font-size: 12px;
        color: #949399;
        transform: scale(0.8);
        z-index: 0;
      }
    }
  }
}
</style>